Microsoft DirectX 8.1 (Visual Basic)

Joystick Data

To set up the joystick device for data retrieval, first call the DirectInputDevice8.SetCommonDataFormat method with DIFORMAT_JOYSTICK or DIFORMAT_JOYSTICK2 as the parameter value. (See Device Data Formats.)

Because some device drivers do not notify Microsoft� DirectInput� of changes in state until explicitly asked to do so, you should always call the DirectInputDevice8.Poll method before attempting to retrieve data from the joystick. For more information, see Polling and Event Notification.

The following sections cover retrieval and interpretation of data from a joystick or other similar input device such as a game pad or steering wheel: